package com.ruoyi.project.modules.processBranch.domain;

import com.ruoyi.project.modules.interfaceinfo.vo.FieldSourceVo;
import com.ruoyi.project.modules.processBranchCondition.domain.ProcessBranchCondition;
import com.ruoyi.project.modules.processBranchEnd.domain.ProcessBranchEnd;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 流程分支对象 t_process_branch
 * 
 * @author smallrain
 * @date 2022-04-02
 */
public class ProcessBranch extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 流程分支ID */
    private Long processBranchId;

    /** 流程分支编码 */
    @Excel(name = "流程分支编码")
    private String processBranchCode;
    /**
     * 流程名称
     */
    private String processBranchName;

    /** 接口ID */
    @Excel(name = "接口ID")
    private Long interfaceId;

    /** 接口类型（1-method 2-BFF 3-虚拟用况接口 4-dubbo ） */
    @Excel(name = "接口类型", readConverterExp = "1=-method,2=-BFF,3=-虚拟用况接口,4=-dubbo, 5-虚拟用况组")
    private String interfaceType;

    /** 上级流程分支ID （一级存储-1） */
    @Excel(name = "上级流程分支ID ", readConverterExp = "一=级存储-1")
    private Long parentProcessBranchId;

    /** 实体ID(虚拟用况ID/分支条件ID/分支结束ID） */
    @Excel(name = "实体ID(虚拟用况ID/分支条件ID/分支结束ID）")
    private Long entityId;

    /** 类型（1-虚拟用况，2-分支条件，3-分支结束） */
    @Excel(name = "类型", readConverterExp = "1=-虚拟用况，2-分支条件，3-分支结束， 4-虚拟用况组")
    private String type;

    /** 层级（1/2/3） */
    @Excel(name = "层级", readConverterExp = "1=/2/3")
    private Integer level;

    /** 排序（1/2/3） */
    @Excel(name = "排序", readConverterExp = "1=/2/3")
    private Integer sortNum;

    /** 分支条件分组（1/2/3） */
    @Excel(name = "分支条件分组", readConverterExp = "1=/2/3")
    private Long branchGroup;

    private ProcessBranchCondition processBranchCondition;

    private List<ProcessBranch> children;

    private String processEndFlag;
    private String endType;
    private String endWay;
    /**
     * if else-if else
     */
    private String conditionType;
    /**
     * 序号
     */
    private String index;

    private ProcessBranch parent;

    private Long preProcessBranchId;

    /**
     * 颜色
     * yellow blue red green
     */
    private String color;

    /**
     * 流程分支描述
     */
    private String processBranchDescription;

    private String aliasName;

    /**
     * 字段来源
     */
    private List<FieldSourceVo> fieldSourceVoList;

    private ProcessBranchEnd processBranchEnd;

    public String getAliasName() {
        return aliasName;
    }

    public void setAliasName(String aliasName) {
        this.aliasName = aliasName;
    }

    public ProcessBranchEnd getProcessBranchEnd() {
        return processBranchEnd;
    }

    public void setProcessBranchEnd(ProcessBranchEnd processBranchEnd) {
        this.processBranchEnd = processBranchEnd;
    }

    public List<FieldSourceVo> getFieldSourceVoList() {
        return fieldSourceVoList;
    }

    public void setFieldSourceVoList(List<FieldSourceVo> fieldSourceVoList) {
        this.fieldSourceVoList = fieldSourceVoList;
    }

    public String getProcessBranchDescription() {
        return processBranchDescription;
    }

    public void setProcessBranchDescription(String processBranchDescription) {
        this.processBranchDescription = processBranchDescription;
    }

    public Long getPreProcessBranchId() {
        return preProcessBranchId;
    }

    public void setPreProcessBranchId(Long preProcessBranchId) {
        this.preProcessBranchId = preProcessBranchId;
    }

    public String getConditionType() {
        return conditionType;
    }

    public void setConditionType(String conditionType) {
        this.conditionType = conditionType;
    }

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getEndType() {
        return endType;
    }

    public void setEndType(String endType) {
        this.endType = endType;
    }

    public String getEndWay() {
        return endWay;
    }

    public void setEndWay(String endWay) {
        this.endWay = endWay;
    }

    public ProcessBranch getParent() {
        return parent;
    }

    public void setParent(ProcessBranch parent) {
        this.parent = parent;
    }

    public String getProcessEndFlag() {
        return processEndFlag;
    }

    public void setProcessEndFlag(String processEndFlag) {
        this.processEndFlag = processEndFlag;
    }

    public List<ProcessBranch> getChildren() {
        return children;
    }

    public void setChildren(List<ProcessBranch> children) {
        this.children = children;
    }

    public String getProcessBranchName() {
        return processBranchName;
    }

    public void setProcessBranchName(String processBranchName) {
        this.processBranchName = processBranchName;
    }

    public ProcessBranchCondition getProcessBranchCondition() {
        return processBranchCondition;
    }

    public void setProcessBranchCondition(ProcessBranchCondition processBranchCondition) {
        this.processBranchCondition = processBranchCondition;
    }

    public void setProcessBranchId(Long processBranchId)
    {
        this.processBranchId = processBranchId;
    }

    public Long getProcessBranchId() 
    {
        return processBranchId;
    }
    public void setProcessBranchCode(String processBranchCode) 
    {
        this.processBranchCode = processBranchCode;
    }

    public String getProcessBranchCode() 
    {
        return processBranchCode;
    }
    public void setInterfaceId(Long interfaceId) 
    {
        this.interfaceId = interfaceId;
    }

    public Long getInterfaceId() 
    {
        return interfaceId;
    }
    public void setInterfaceType(String interfaceType) 
    {
        this.interfaceType = interfaceType;
    }

    public String getInterfaceType() 
    {
        return interfaceType;
    }
    public void setParentProcessBranchId(Long parentProcessBranchId) 
    {
        this.parentProcessBranchId = parentProcessBranchId;
    }

    public Long getParentProcessBranchId() 
    {
        return parentProcessBranchId;
    }
    public void setEntityId(Long entityId) 
    {
        this.entityId = entityId;
    }

    public Long getEntityId() 
    {
        return entityId;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setLevel(Integer level) 
    {
        this.level = level;
    }

    public Integer getLevel() 
    {
        return level;
    }
    public void setSortNum(Integer sortNum) 
    {
        this.sortNum = sortNum;
    }

    public Integer getSortNum() 
    {
        return sortNum;
    }
    public void setBranchGroup(Long branchGroup) 
    {
        this.branchGroup = branchGroup;
    }

    public Long getBranchGroup() 
    {
        return branchGroup;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("processBranchId", getProcessBranchId())
            .append("processBranchCode", getProcessBranchCode())
            .append("interfaceId", getInterfaceId())
            .append("interfaceType", getInterfaceType())
            .append("parentProcessBranchId", getParentProcessBranchId())
            .append("entityId", getEntityId())
            .append("type", getType())
            .append("level", getLevel())
            .append("sortNum", getSortNum())
            .append("branchGroup", getBranchGroup())
            .toString();
    }
}
